import {Children, lazy} from 'react'

let Main=lazy(()=>import('../pages/main/Index'))
let City=lazy(()=>import('../pages/city/Index'))
let Classfly=lazy(()=>import('../pages/classfly/Index'))
let Deatil=lazy(()=>import('../pages/deatil/Index'))
let Home=lazy(()=>import('../pages/home/Index'))
let Login=lazy(()=>import('../pages/login/Index'))
let Messsage=lazy(()=>import('../pages/message/Index'))
let User=lazy(()=>import('../pages/user/Index'))

import {
  AppOutline,
  MessageOutline,
  MessageFill,
  UnorderedListOutline,
  UserOutline,
} from 'antd-mobile-icons'

export let homeRouter=[
    {
        path:'/',
        element:<Home></Home>,
        title:'首页',
        icon:<AppOutline></AppOutline>
    },
     {
        path:'/classfly',
        element:<Classfly></Classfly>,
        title:'分类',
         icon:<MessageOutline></MessageOutline>
    },
     {
        path:'/message',
        element:<Messsage></Messsage>,
        title:'消息',
         icon:<MessageFill></MessageFill>
    },
     {
        path:'/user',
        element:<User></User>,
        title:'我的',
         icon:<UserOutline></UserOutline>
    },
]


let routes=[
    {
        path:'/',
        element:<Main></Main>,
        children:homeRouter
    },
    {
        path:'/city/:type',
        element:<City></City>
    },
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/deatil',
        element:<Deatil></Deatil>
    },
]

export default routes